/*
 * Copyright (c) 2006-2010  Ingenic Semiconductor Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <gpio.h>

// default gpio state is input pull;
__initdata int gpio_ss_table[][2] = {
	{32 * 0 +  0,	GSS_INPUT_NOPULL},
	{32 * 0 +  1,	GSS_INPUT_NOPULL},
	{32 * 0 +  2,	GSS_INPUT_NOPULL},
	{32 * 0 +  3,	GSS_INPUT_NOPULL},
	{32 * 0 +  4,	GSS_INPUT_NOPULL},
	{32 * 0 +  5,	GSS_INPUT_NOPULL},
	{32 * 0 +  6,	GSS_INPUT_NOPULL},
	{32 * 0 +  7,	GSS_INPUT_NOPULL},
	{32 * 0 + 16,	GSS_INPUT_PULL	},
	{32 * 0 + 17,	GSS_INPUT_PULL	},
	{32 * 0 + 18,	GSS_INPUT_PULL	},
	{32 * 0 + 19,	GSS_INPUT_PULL	},
	{32 * 0 + 20,	GSS_INPUT_PULL	},
	{32 * 0 + 21,	GSS_INPUT_PULL	},
	{32 * 0 + 22,	GSS_INPUT_PULL	},
	{32 * 0 + 23,	GSS_INPUT_PULL	},
	{32 * 0 + 27,	GSS_INPUT_PULL	},
	{32 * 0 + 29,	GSS_INPUT_PULL	},
	{32 * 0 + 30,	GSS_INPUT_NOPULL},
	/* GPIO Group - B */
	{32 * 1 + 0,	GSS_INPUT_PULL	},
	{32 * 1 + 1,	GSS_INPUT_PULL 	},
	{32 * 1 + 2,	GSS_INPUT_PULL},
	{32 * 1 + 3,	GSS_INPUT_PULL  },
	{32 * 1 + 4,	GSS_INPUT_PULL},
	{32 * 1 + 5,	GSS_INPUT_PULL},
	{32 * 1 + 6,	GSS_INPUT_PULL	},
	{32 * 1 + 7,	GSS_INPUT_PULL},
	{32 * 1 + 8,	GSS_INPUT_PULL },
	{32 * 1 + 9,	GSS_INPUT_PULL},
	{32 * 1 + 10,	GSS_INPUT_PULL},
	{32 * 1 + 11,	GSS_INPUT_PULL},
	{32 * 1 + 12,	GSS_INPUT_PULL},
	{32 * 1 + 13,	GSS_INPUT_PULL},
	{32 * 1 + 14,	GSS_INPUT_PULL},
	{32 * 1 + 15,	GSS_INPUT_PULL},
	{32 * 1 + 16,	GSS_INPUT_PULL},
	{32 * 1 + 17,	GSS_INPUT_PULL},
	{32 * 1 + 20,	GSS_OUTPUT_LOW},
	{32 * 1 + 21,	GSS_INPUT_NOPULL},
	{32 * 1 + 28,	GSS_OUTPUT_LOW	},
	{32 * 1 + 29,	GSS_INPUT_PULL	},
	{32 * 1 + 30,	GSS_OUTPUT_LOW	},
	{32 * 1 + 31,	GSS_INPUT_NOPULL},

	/* GPIO Group - C */
	{32 * 2 +  0,	GSS_INPUT_NOPULL},
	{32 * 2 +  1,	GSS_INPUT_NOPULL},
	{32 * 2 +  2,	GSS_OUTPUT_LOW	},
	{32 * 2 +  3,	GSS_OUTPUT_LOW	},
	{32 * 2 +  4,	GSS_OUTPUT_LOW	},
	{32 * 2 +  5,	GSS_OUTPUT_LOW	},
	{32 * 2 +  6,	GSS_OUTPUT_LOW	},
	{32 * 2 +  7,	GSS_OUTPUT_LOW	},
	{32 * 2 +  8,	GSS_OUTPUT_LOW	},
	{32 * 2 +  9,	GSS_OUTPUT_LOW	},
	{32 * 2 + 10,	GSS_INPUT_NOPULL},
	{32 * 2 + 11,	GSS_INPUT_NOPULL},
	{32 * 2 + 12,	GSS_OUTPUT_LOW	},
	{32 * 2 + 13,	GSS_OUTPUT_LOW	},
	{32 * 2 + 14,	GSS_OUTPUT_LOW	},
	{32 * 2 + 15,	GSS_OUTPUT_LOW	},
	{32 * 2 + 16,	GSS_OUTPUT_LOW	},
	{32 * 2 + 17,	GSS_OUTPUT_LOW	},
	{32 * 2 + 18,	GSS_OUTPUT_LOW 	},
	{32 * 2 + 19,	GSS_OUTPUT_LOW 	},
	{32 * 2 + 20,	GSS_INPUT_NOPULL},
	{32 * 2 + 21,	GSS_INPUT_NOPULL},
	{32 * 2 + 22,	GSS_OUTPUT_LOW 	},
	{32 * 2 + 23,	GSS_OUTPUT_LOW 	},
	{32 * 2 + 24,	GSS_OUTPUT_LOW 	},
	{32 * 2 + 25,	GSS_OUTPUT_LOW	},
	{32 * 2 + 26,	GSS_OUTPUT_LOW	},
	{32 * 2 + 27,	GSS_OUTPUT_LOW	},
	/* GPIO Group - D */
	{32 * 3 + 14,	GSS_OUTPUT_LOW},
	{32 * 3 + 15,	GSS_INPUT_PULL},
	{32 * 3 + 17,	GSS_INPUT_NOPULL},
	{32 * 3 + 18,	GSS_INPUT_NOPULL},
	{32 * 3 + 19,	GSS_INPUT_NOPULL},
	{32 * 3 + 20,	GSS_OUTPUT_LOW},
	{32 * 3 + 21,	GSS_OUTPUT_LOW},
	{32 * 3 + 22,	GSS_OUTPUT_LOW},
	{32 * 3 + 23,	GSS_OUTPUT_LOW},
	{32 * 3 + 24,	GSS_OUTPUT_LOW},
	{32 * 3 + 25,	GSS_OUTPUT_LOW},
	{32 * 3 + 26,	GSS_INPUT_PULL},
	{32 * 3 + 27,	GSS_INPUT_PULL},
	{32 * 3 + 28,	GSS_INPUT_PULL},
	{32 * 3 + 29,	GSS_INPUT_PULL},
	{32 * 3 + 30,	GSS_INPUT_PULL},
	{32 * 3 + 31,	GSS_INPUT_PULL},
	/* GPIO Group - E */
	{32 * 4 +  0,	GSS_INPUT_NOPULL},
	{32 * 4 +  1,	GSS_OUTPUT_LOW},
	{32 * 4 +  2,	GSS_INPUT_PULL},
	{32 * 4 +  3,	GSS_INPUT_PULL},
	{32 * 4 + 10,	GSS_INPUT_PULL},
	{32 * 4 + 20,	GSS_INPUT_PULL},
	{32 * 4 + 21,	GSS_INPUT_PULL},
	{32 * 4 + 22,	GSS_INPUT_PULL},
	{32 * 4 + 23,	GSS_INPUT_PULL},
	{32 * 4 + 28,	GSS_INPUT_PULL},
	{32 * 4 + 29,	GSS_INPUT_PULL},
	{32 * 4 + 30,	GSS_INPUT_PULL},
	{32 * 4 + 31,	GSS_INPUT_PULL},
	/* GPIO Group - F */
	{32 * 5 +  0,	GSS_INPUT_PULL},
	{32 * 5 +  1,	GSS_INPUT_PULL},
	{32 * 5 +  2,	GSS_OUTPUT_LOW},
	{32 * 5 +  3,	GSS_INPUT_PULL},
	{32 * 5 +  4,	GSS_INPUT_PULL},
	{32 * 5 +  5,	GSS_INPUT_PULL},
	{32 * 5 +  6,	GSS_INPUT_PULL},
	{32 * 5 +  7,	GSS_INPUT_NOPULL},
	{32 * 5 +  8,	GSS_INPUT_PULL},
	{32 * 5 +  9,	GSS_INPUT_PULL},
	{32 * 5 + 10,	GSS_INPUT_PULL},
	{32 * 5 + 11,	GSS_INPUT_PULL},
	{32 * 5 + 12,	GSS_INPUT_PULL},
	{32 * 5 + 13,	GSS_INPUT_PULL},
	{32 * 5 + 14,	GSS_INPUT_PULL},
	{32 * 5 + 15,	GSS_OUTPUT_LOW},
	/* GPIO Group - G */
	{32 * 6 +  6,	GSS_INPUT_PULL},
	{32 * 6 +  7,	GSS_INPUT_PULL},
	{32 * 6 +  8,	GSS_INPUT_PULL},
	{32 * 6 +  9,	GSS_INPUT_PULL},
	{32 * 6 + 10,	GSS_INPUT_NOPULL},
	{32 * 6 + 11,	GSS_INPUT_NOPULL},
	{32 * 6 + 12,	GSS_INPUT_NOPULL},
	{32 * 6 + 13,	GSS_INPUT_NOPULL},
	{32 * 6 + 14,	GSS_INPUT_NOPULL},
	{32 * 6 + 15,	GSS_INPUT_NOPULL},
	{32 * 6 + 16,	GSS_INPUT_NOPULL},
	{32 * 6 + 17,	GSS_INPUT_NOPULL},
	/* GPIO Group Set End */
	{GSS_TABLET_END,GSS_TABLET_END	}
};

